package com.zmc.admin.infrastructure.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zmc.admin.infrastructure.entity.SysUserEntity;
import com.zmc.admin.infrastructure.bean.query.SysUserQuery;
import com.zmc.common.utils.PageUtils;

import java.util.List;

/**
 * 用户信息表
 *
 * @author zmc
 * @email 
 * @date 2024-10-09 17:27:49
 */
public interface SysUserService extends IService<SysUserEntity> {

    SysUserEntity validateUser(String username);

    /**
     * 根据用户ID查询用户所属角色组
     *
     * @param userName 用户名
     * @return 结果
     */
    public String selectUserRoleGroup(String userName);

    /**
     * 根据用户ID查询用户所属岗位组
     *
     * @param userName 用户名
     * @return 结果
     */
    public String selectUserPostGroup(String userName);

    boolean checkPhoneUnique(SysUserEntity currentUser);

    boolean checkEmailUnique(SysUserEntity currentUser);

    int resetUserPwd(String userName, String newPassword);

    boolean checkUserNameUnique(SysUserEntity sysUser);

    boolean registerUser(SysUserEntity sysUser);

    SysUserEntity selectUserByUserName(String userName);

    List<SysUserEntity> selectAllocatedList(SysUserQuery user);

    List<SysUserEntity> selectUnallocatedList(SysUserQuery user);

    PageUtils pageUserList(SysUserQuery query);

    List<SysUserEntity> selectUserList(SysUserQuery query);

    String importUser(List<SysUserEntity> userList, boolean updateSupport, String operName);

    void insertUserAuth(Long userId, Long[] roleIds);

    SysUserEntity getMerchantId(String merchantId);

}

